﻿using System.Reflection;

namespace Mbs.Reflection
{
    public delegate object Func(object target, params object[] arguments);
    public delegate void Proc(object target,params object[] arguments);

    public static class FuncExtensions
    {
        public static object FastInvoke(this MethodInfo method, object target, params object[] args)
        {
            var func = DynamicMethodFactoryProxy.Instance.CreateFuncMethod(method);
            return func(target, args);
        }
    }
}
